﻿Imports System.Collections.Generic
Imports Pop.Api.Response
Imports Pop.Api.Util
Namespace Pop.Api.Request
    ''' <summary>
    ''' 1.04 (初级)修改商品详情
    ''' </summary>
    Public Class ModifyItemDetailInfoRequest
        Inherits PopRequest(Of ModifyItemDetailInfoResponse)

        ''' <summary>
        ''' 商品编码
        ''' </summary>
        Property ItemCode As String

        ''' <summary>
        ''' 商品私有编码
        ''' </summary>
        Property ItemLocalCode As String

        ''' <summary>
        ''' 商品详情说明
        ''' </summary>
        Property DetailInfo As String

#Region "Overrides"

        Protected Overrides Function GetApiName() As String
            Return "item.modifyItemDetailInfo"
        End Function

        Protected Overrides Function GetParameters() As IEnumerable(Of KeyValuePair(Of String, String))
            Dim parameters As New PopDictionary
            parameters.Add("itemCode", Me.ItemCode)
            parameters.Add("itemLocalCode", Me.ItemLocalCode)
            parameters.Add("detailInfo", Me.DetailInfo)
            Return parameters
        End Function

        Protected Overrides Sub Validate()
            Me.DetailInfo.ValidateRequired("DetailInfo")
            Me.DetailInfo.ValidateRequired("DetailInfo")
            Me.DetailInfo.ValidateMaxLength("DetailInfo", 60 * 1024)
        End Sub

#End Region

    End Class
End Namespace